#pragma once

#include <GL/glut.h>
#include "vector3D.h"

#include <iostream>
using namespace std;

/**
	* Class for Bounding Box (AABB)
	*
	* Creates the bounding box
	* Handles collision detection
*/
class BoundingBox{
private:
	Vector3D position;
	float height, width, depth;
	float r, g, b;
public:
	BoundingBox(void);
	~BoundingBox(void);

	/**
		* Function to initialize the box
		*
		* @param Position of the box. Vector3D
		* @param Width of the box
		* @param Height of the box
		* @param Depth of the box
	*/
	void InitBox(Vector3D position, float width, float height, float depth);
	/**
		* Function to draw the outline of bounding box. Debugging purpose
	*/
	void DrawBox(void);

	/**
		* Function to change the position of the box
		*
		* @param New position of box
	*/
	void SetPosition(Vector3D position);
	
	/**
		* Function to get the position of the box
		*
		* @return The current position of the box
	*/
	Vector3D GetPosition(void);

	/**
		* Function to change the color of the box. Debugging purpose
		*
		* @param Red color density
		* @param Green color density
		* @param Blue color density
	*/
	void SetColor(float r, float g, float b);

	/**
		* Function to get the height of the box
	*/
	float GetHeight(void);
	
	/**
		* Function to get the width of the box
	*/
	float GetWidth(void);
	
	/**
		* Function to get the depth of the box
	*/
	float GetDepth(void);

	/**
		* Function to test for box to box collision
		*
		* @param Pass in another box for collision checking
		* @return True if collided else false
	*/
	bool HitTest(BoundingBox &box);
};